#!/bin/bash

# kill应用
for pid in $(netstat -anp|grep api_smart_home | awk '{printf $7}' | cut -d/ -f1); do
    echo pid is $pid
    kill -9 $pid
done

/home/www/smart_home/api/api_smart_home &